package com.wonghiu.provider;

import com.wonghiu.framework.transport.netty.server.NettyRpcServer;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @Author wonghiu
 * @Date 2021/8/11 16:30
 * @Version 1.0.1
 */
@Configuration
@ComponentScan("com.wonghiu")
public class ProviderMain {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ProviderMain.class);
        NettyRpcServer nettyRpcServer = (NettyRpcServer) applicationContext.getBean("nettyRpcServer");
        Object helloServiceImp = applicationContext.getBean("helloServiceImp");
        nettyRpcServer.start();
    }
}
